cmake_minimum_required(VERSION 3.13)
project(cGeoLearn)
find_package(fmt CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS date_time)
find_package(gdal REQUIRED)
# 配置 Debug 模式
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "选择构建类型: Debug, Release, RelWithDebInfo, MinSizeRel" FORCE)
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
endif()

# # 添加调试信息
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
file(GLOB_RECURSE SOURCES
    CONFIGURE_DEPENDS
    "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
)
message("SOURCES: ${SOURCES}")
add_executable(cGeoLearn ${SOURCES})
target_link_libraries(cGeoLearn PRIVATE fmt::fmt)
target_link_libraries(cGeoLearn PRIVATE Boost::date_time)
target_link_libraries(cGeoLearn PRIVATE gdal::gdal)